<html>
<head><meta charset="utf-8"><title>Path from DefId · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Path.20from.20DefId.html">Path from DefId</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207073209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Path%20from%20DefId/near/207073209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Path.20from.20DefId.html#207073209">(Aug 16 2020 at 14:13)</a>:</h4>
<p>Is there a way to get a <code>Path</code> from a <code>DefId</code>?</p>



<a name="207075311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Path%20from%20DefId/near/207075311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Path.20from.20DefId.html#207075311">(Aug 16 2020 at 15:12)</a>:</h4>
<p>I don't think my question is making any sense^^ sorry!</p>



<a name="207075463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Path%20from%20DefId/near/207075463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Path.20from.20DefId.html#207075463">(Aug 16 2020 at 15:16)</a>:</h4>
<p>I am trying to take a look at <a href="https://github.com/rust-lang/rust/issues/60465">https://github.com/rust-lang/rust/issues/60465</a><br>
But its not clear what should be done. Would adding a <code>def_id: DefId</code> alongside the path and using it in <code>trait_def_id</code> be enough?<br>
Or do we want to remove <code>trait_def_id</code> entirely and let the previous caller of that function handle the path directly to let them handle errors locally? A few of the user of that method are just unwrapping so I am not sure if it would be an improvement actually.</p>



<a name="207078090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Path%20from%20DefId/near/207078090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Path.20from.20DefId.html#207078090">(Aug 16 2020 at 16:30)</a>:</h4>
<p>(deleted)</p>



<a name="207078100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Path%20from%20DefId/near/207078100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Path.20from.20DefId.html#207078100">(Aug 16 2020 at 16:30)</a>:</h4>
<p>(deleted)</p>



<a name="207078126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Path%20from%20DefId/near/207078126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Path.20from.20DefId.html#207078126">(Aug 16 2020 at 16:31)</a>:</h4>
<p>oh wait I got <code>Path</code> mixed up with <code>Span</code> sorry, ignore me</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>